<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="xi">喜羊羊</button>
    <button id="lan">懒洋洋</button>
    <div>
        <img src="C:\java-script_learning\image\xi.jpg" title="喜羊羊">
    </div>
    <button id="btn">获取</button>
    <input type="text" value="输入内容">
    <script>
        // 切换图片
        var xi = document.querySelector('#xi');
        var lan = document.querySelector('#lan');
        var image = document.querySelector('img');
        lan.onclick = function() {
            image.src = 'C:\\java-script_learning\\image\\lan.jpg';
            image.title = '懒洋洋';        }
        xi.onclick = function() {
            image.src = 'C:\\java-script_learning\\image\\xi.jpg';
            image.title = '懒洋洋';
        }
        
        // 改变文本框内容
        var btn = document.querySelector('#btn');
        var input = document.querySelector('input');
        btn.onclick = function() {
            input.value = '别输入';
            btn.disabled = true;
        }
        
    </script>
</body>
</html>